<template>
  <div>
    <button @click="isShow = !isShow">显示/隐藏元素</button>

    <transition enter-active-class="animate__hinge" leave-active-class="animate__rollOut">
      <div class="box animate__animated" v-show="isShow"></div>
    </transition>
  </div>
</template>

<script>
export default {
  name: "App",
  data() {
    return {
      isShow: true,
    };
  },
};
</script>

<style scoped>
.box {
  width: 300px;
  height: 300px;
  background: skyblue;
}
</style>